﻿using PetaPoco;

namespace BrnMall.Manager.Domain.Store
{
    /// <summary>
    /// 商户微信配置
    /// </summary>
    [TableName("bma_storewxapp")]
    [PrimaryKey("StoreWid")]
    public class StoreWxApp
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int StoreWid { get; set; }
        
        public int StoreId { get; set; }
        /// <summary>
        /// 小程序ID
        /// </summary>
        public string WeAppId { get; set; }
        /// <summary>
        /// 小程序Secret
        /// </summary>
        public string WeAppSecret { get; set; }
        /// <summary>
        /// 微信支付商户ID
        /// </summary>
        public string MchId { get; set; }
        /// <summary>
        /// 微信支付商户KEY
        /// </summary>
        public string MchKey { get; set; }
        /// <summary>
        /// 支付方式 0：微信，1;邮惠付
        /// </summary>
        public int PayType { get; set; }
        /// <summary>
        /// 邮惠付商户ID
        /// </summary>
        public string PsbcMchId { get; set; }
        /// <summary>
        /// 邮惠付商户秘钥
        /// </summary>
        public string PsbcMchKey { get; set; }
        /// <summary>
        /// 发货成功模板消息ID
        /// </summary>
        [Column("deliver_success_tid")]
        public string DeliverSuccessTid { get; set; }

        /// <summary>
        /// 支付成功模板消息ID
        /// </summary>
        [Column("pay_success_tid")]
        public string PaySuccessTid { get; set; }
        /// <summary>
        /// 预约成功模板消息ID
        /// </summary>
        [Column("AppointmentSuccessTid")]
        public string AppointMentSuccessTid { get; set; }
        /// <summary>
        /// 预约处理模板消息ID
        /// </summary>
        [Column("AppointmentDisposeSuccessTid")]
        public string AppointMentDisposeSuccessTid { get; set; }
        public string SendMsgCallbackTid { get; set; }
        /// <summary>
        /// 证书路径
        /// </summary>
        [Column("cert_path")]
        public string CertPath { get; set; }
        /// <summary>
        /// 是否默认
        /// </summary>
        public bool IsDefault { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Active { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public StoreWxApp()
        {
            StoreWid = 0;
            StoreId = 0;
            WeAppId = WeAppSecret = MchId = MchKey = DeliverSuccessTid = PaySuccessTid = SendMsgCallbackTid=string.Empty;
            CertPath = string.Empty;
            IsDefault = false;
            Active = false;
            PayType = 0;
            PsbcMchId = PsbcMchKey = string.Empty;
        }

    }
}
